package com.fanjun.learning.multithread.Read_Write_Lock_Pattern;

/**
 * <p>模拟并发读写锁模式,核心类:ReadWriteLock</p>
 */
public class Main {
    public static void main(String[] args){
        Data data = new Data(10);
        new ReaderThread(data).start();
        new ReaderThread(data).start();
        new ReaderThread(data).start();
        new ReaderThread(data).start();
        new ReaderThread(data).start();
        new WriterThread(data,"dhsdihiefhkjfjksahdusidh").start();
        new WriterThread(data,"sdifuirhfirhgikhjdkhsjkd").start();
    }
}
